﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DXApplicationTangche.UC.货号管理.service;
using DevExpress.XtraGrid.Demos.util;

namespace DXApplicationTangche.UC.货号管理.成衣异常
{
    public partial class Form成衣异常一览 : DevExpress.XtraEditors.XtraForm
    {
        public Form成衣异常一览()
        {
            InitializeComponent();
            this.gridControl成衣异常一览.DataSource = 成衣异常Service.getGarmentExceptionLogsBySolvedFalse();
        }

        private void 查看异常详情ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            String titleid = FunctionHelper.GetgridViewValue(
                this.gridView成衣异常一览, this.gridView成衣异常一览.FocusedRowHandle, "id"
                );
            new Form异常分录一览(titleid).ShowDialog();
        }

        private void 放行ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            String id = FunctionHelper.GetgridViewValue(
                this.gridView成衣异常一览, this.gridView成衣异常一览.FocusedRowHandle, "id"
                );
            if (!String.IsNullOrEmpty(id))
            {
                new Form成衣异常放行(id).ShowDialog();
                this.gridControl成衣异常一览.DataSource = 成衣异常Service.getGarmentExceptionLogsBySolvedFalse();
                this.gridView成衣异常一览.RefreshData();
            }
        }
    }
}